import lianjia
import rent58


def callback(data):
    global apartments

    apartments = apartments + data
    if len(apartments) > 100:
        return False
    else:
        return True


crawler = lianjia.Products('http://192.168.80.222:3128', 'hz', callback)
# lianjia.DealRecord('http://192.168.80.222:3128', 'hz', callback)
# lianjia.DealRecord('http://192.168.80.222:3128', 'hz', callback)
rent58.Personal('http://192.168.80.222:3128', 'hz', callback)
